import Vue from 'vue'
window.Vue = Vue; //方便全局使用 不需要引入
import App from './App.vue'
import router from './router'
import store from './store/index'
import VueWechatTitle from 'vue-wechat-title'
import 'normalize.css';
import Http from './utils/http'
import Util from './utils/util'
import native from './utils/native'
import User from './utils/user'
// import 'lib-flexible'


import 'amfe-flexible'

import { Toast } from 'mint-ui';

const appConf = {
    name: '新闻',
    wechat: {
        appid: 'wxae95c91086d47010'
    }
}


Vue.use(VueWechatTitle);
Vue.config.productionTip = true;
Vue.prototype.$http = Http;
Vue.prototype.$util = Util;
Vue.prototype.$user = User;
Vue.prototype.$native = native;
Vue.prototype.$appconf = appConf;
Vue.prototype.$toast = Toast;
window.router = router;


//app端打开页面的十后  auth_id
router.beforeEach((to, from, next) => {
    next()
});

import moment from 'moment'
Vue.filter('dateformat', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') {
    return moment(dataStr).format(pattern)
})

new Vue({
    router,
    store,
    render: h => h(App),
}).$mount('#app');